package com.yxq.mdt.app.modules.personal.presenter;

import com.yxq.mdt.app.base.BasePresenter;
import com.yxq.mdt.app.modules.personal.bean.GroupBean;
import com.yxq.mdt.app.modules.personal.model.GroupModel;
import com.yxq.mdt.app.modules.personal.model.SettingModel;
import com.yxq.mdt.app.net.ApiModel;

public class GroupPresenter extends BasePresenter<IGroupContract.View, GroupModel> implements IGroupContract.Presenter {

    public GroupPresenter(IGroupContract.View rootView, GroupModel model) {
        super(rootView, model);
    }

    @Override
    public void queryUserByAllGroup(int page, int pageSize) {
        mBaseModel.queryUserByAllGroup(page, pageSize, new ApiModel.CommonCallback<GroupBean>() {
            @Override
            public void onSuccess(GroupBean data) {
                mRootView.onLoadGroupListSuccess(data);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadGroupListFailed(errMsg);
            }
        });
    }

}
